<template>
	<!-- 我的 -->
	<view class="my public">
		<view class="my-main">
			<view class="header">
				<view class="header-back"></view>
				<view class="header-main">
					<view class="header-main-image">
						<view class="userImage">
							<image :src="'https://songcan.xing-peng.com/' + image" mode=""></image>
						</view>
					</view>
					 <!-- @click="JumpLogin" -->
					<view class="header-main-user">
						<view class="">
							<!-- 骑手姓名 -->
							{{arr.realname || ''}}
						</view>
						<view class="">
							{{arr.mobile|| ''}}
						</view>
					</view>
					<view class="sunData">
						<view class="sunData-title">
							日数据
						</view>
						<view class="sunData-main">
							<view class="sunData-main-item">
								<view class="">
									{{list.order_count|| 0}}
								</view>
								<view class="">
									今日接单
								</view>
							</view>
							<view class="sunData-main-item">
								<view class="">
									{{list.projected_income|| 0}}
								</view>
								<view class="">
									预计收入
								</view>
							</view>
							<!-- <view class="sunData-main-item">
								<view class="">
									{{list.projected_income|| 0}}
								</view>
								<view class="">
									超时扣除
								</view>
							</view> -->
						</view>
					</view>
				</view>
			</view>
		</view>
		<!-- 我的服务 -->
		<view class="giveServiceTo">
			<view class="title">
				我的服务
			</view>
			<view class="main">
				<!-- <view class="main-item" @click="JumpRealNameAuthentication">
					<view class="main-left">
						<image src="../static/my/RealNameAuthentication.png" mode=""></image>
						<image src="https://i.hd-r.cn/9167dff57719dcf9d81b2ceafe5900a6.png" mode=""></image>
					</view>
					<view class="main-right">
						<view class="">
							实名认证
						</view>
						<view class="">
							>
						</view>
					</view>
				</view> -->
				<view class="main-item" @click="JumpAccount">
					<view class="main-left">
						<!-- <image src="../static/my/balance.png" mode=""></image> -->
						<image src="https://i.hd-r.cn/546c545322f371ae86281d62d421d4d4.png" mode=""></image>
					</view>
					<view class="main-right">
						<view class="">
							我的账户
						</view>
						<view class="">
							>
						</view>
					</view>
				</view>
				<view class="main-item" @click="JumpEvaluate">
					<view class="main-left">
						<!-- <image src="../static/my/evaluate.png" mode=""></image> -->
						<image src="https://i.hd-r.cn/85eb9c148bfa23c25f546cac502b237d.png" mode=""></image>
					</view>
					<view class="main-right">
						<view class="">
							我的评价
						</view>
						<view class="">
							>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	const $api = require('@/utils/request.js').API
	export default {
		data(){
			return {
				arr: [],
				list: [],
				image: '',
				tabBarNumStatus:2,
			}
		},
		created() {
			this.orderStatistics()
			this.shipperInformation()
			this.tabBarNum()
			this.userInformation()
		},
		methods: {
			userInformation(){
				$api.postUserInformation({}).then(res => {
					// res.data.data.headimg
					this.image = res.data.data.headimg
				})
			},
			orderStatistics(){
				$api.postOrderStatistics({
					// token:uni.getStorageSync('token')
				}).then(res => {
					this.list = res.data.data
				})
			},
			shipperInformation(){
				$api.postShipperInformation({
					// token: uni.getStorageSync('token')
				}).then(res => {
					this.arr = res.data.data
				})
			},
			// 登录
			JumpLogin(){
				uni.navigateTo({
					// url:'../../pages/login/login'
					url:'../login/login'
				})
			},
			// 实名认证
			JumpRealNameAuthentication(){
				uni.navigateTo({
					url:'../my/RealNameAuthentication'
				})
			},
			// 我的账户
			JumpAccount(){
				uni.navigateTo({
					url:'../my/account'
				})
			},
			// 我的评价
			JumpEvaluate(){
				uni.navigateTo({
					url:'../my/evaluate'
				})
			},
			tabBarNum(e){
				this.tabBarNumStatus = e
				uni.reLaunch({
					url:e
				})
			}
		}
	}
</script>

<style lang="less" scoped>
	.my {
		background: #F8F8F8;

		.my-main {
			height: 640rpx;
			// background: red;
		}

		// 头部内容
		.header {
			position: relative;

			.header-back {
				width: 750rpx;
				height: 343rpx;
				background: linear-gradient(0deg, #F14500 0%, #FF9D76 98%);
			}

			.header-main {
				position: absolute;
				width: 702rpx;
				height: 344rpx;
				background: #FFFFFF;
				box-shadow: 0rpx 2rpx 20rpx 0rpx rgba(0, 0, 0, 0.02);
				border-radius: 15rpx;
				// bottom: -210rpx;
				bottom: -280rpx;
				// left: 305rpx;
				left: 24rpx;

				.header-main-image {
					// height: 140rpx;
					height: 90rpx;
				}

				// 骑手头像
				.userImage {
					position: absolute;
					width: 140rpx;
					height: 140rpx;
					top: -70rpx;
					left: 281rpx;
					background: #E5E5E5;
					border-radius: 50%;
					margin: auto;
					image {
						width: 100%;
						height: 100%;
					}
				}

				// 骑手姓名，电话
				.header-main-user {
					text-align: center;

					view:first-child {
						font-size: 30rpx;
						font-weight: 400;
						color: #000000;
					}

					view:last-child {
						font-size: 24rpx;
						font-weight: 400;
						color: #000000;
					}
				}

				// 日数据
				.sunData {
					.sunData-title {
						font-size: 26rpx;
						font-weight: 500;
						color: #000000;
						padding: 29rpx 0 23rpx 28rpx;
					}

					.sunData-main {
						display: flex;
						justify-content: space-around;
						align-items: center;
						text-align: center;

						.sunData-main-item {
							font-size: 24rpx;
							font-weight: 400;
							color: #444343;

							view:first-child {
								font-size: 36rpx;
								font-weight: 400;
								color: #000000;
							}
						}
					}
				}
			}
		}

		// 我的服务
		.giveServiceTo {
			width: 702rpx;
			// height: 338rpx;
			background: #FFFFFF;
			box-shadow: 0rpx 2rpx 20rpx 0rpx rgba(0, 0, 0, 0.02);
			border-radius: 15rpx;
			margin: auto;

			.title {
				font-size: 30rpx;
				font-weight: 600;
				color: #171717;
				padding: 30rpx 0 0 24rpx;
			}

			.main {
				.main-item {
					display: flex;
					align-items: center;
					height: 90rpx;
					line-height: 90rpx;
					.main-left {
						padding: 15rpx 13rpx 0 24rpx;
						image {
							width: 38rpx;
							height: 38rpx;
						}
					}

					.main-right {
						display: flex;
						justify-content: space-between;
						width: 100%;
						border-bottom: 1px solid #ECECEC;
						margin-right: 25rpx;
						// padding: 22rpx 0 20rpx 0;
						font-size: 28rpx;
						font-weight: 400;
						color: #4F4F4F;
					}
				}

				.main-item:last-child .main-right {
					border: none;
				}
			}
		}
		.footer {
			position: fixed;
			bottom: 0;
			left: 0;
		}
	}
</style>